{{define "head"}}
    <style type="text/css">
        pre {
            white-space: pre-wrap !important;
            word-wrap: break-word !important;
            *white-space: normal !important;
        }
    </style>
{{end}}

{{define "body"}}
<div class="container-fluid p-t-15">
    <div class="row m-b">
        <div class="col-sm-12">
            <div class="tabs-container">
                <ul class="nav nav-tabs">
                    <li class="active"><a href="javascript:void(0);">{{.file_path}}【总行数：{{.line}}行】</a></li>
                </ul>
            </div>
        </div>
    </div>

    <div class="row">
        <div class="col-sm-12">
            <div class="ibox float-e-margins">
                <div class="ibox-title">
                    <form role="form" class="form-inline" method="get" id="lineform">
                        <input type="hidden" name="path" value="{{.file_path}}">
                        <div class="form-group">
                            起始行数 <input class="form-control" type="text" name="start_line" id="start_line" value="{{.start_line}}" size="10">
                        </div>
                        &nbsp;&nbsp;
                        <div class="form-group">
                            结束行数 <input class="form-control" type="text" name="end_line" id="end_line" value="{{.end_line}}" size="10">
                        </div>
                        &nbsp;&nbsp;
                        <button type="submit" class="btn btn-primary">查询</button>
                    </form>
                </div>
            </div>
        </div>
    </div>

    <div class="row">
        <div class="col-sm-12">
            <div class="ibox float-e-margins">
                <div class="ibox-content">
                    <table class="table table-striped table-bordered table-hover dataTables-example dataTable">
                        <thead>
                        <tr role="row">
                            <th width="46">行数</th>
                            <th></th>
                        </tr>
                        </thead>
                        {{range $k,$v := .filecontents}}
                        <tr class="gradeA">
                            <td>{{$k}}</td>
                            <td><pre>{{$v}}</pre></td>
                        </tr>
                        {{end}}
                    </table>
                </div>
            </div>
        </div>
    </div>
</div>
{{end}}

{{define "script"}}{{end}}